package org.liuqm.mapper;

import org.apache.ibatis.annotations.Param;
import org.liuqm.pojo.SysUser;
import org.liuqm.pojo.condition.SysUserCondition;
import org.liuqm.pojo.vo.SysUserVo;

import java.util.List;
import java.util.Map;

/**
* @author 10261
* @description 针对表【sys_user(系统用户)】的数据库操作Mapper
* @createDate 2024-11-18 10:41:47
* @Entity org.liuqm.pojo.SysUser
*/
public interface SysUserMapper {

    /**
     * 按条件查询用户信息
     * @return
     */
    List<SysUserVo> findUserByCondition(@Param("sysUser") SysUser sysUser ,
                                        @Param("pageIndex")Integer pageIndex,
                                        @Param("pageSize")Integer pageSize);

    /**
     * 按条件查询用户信息
     * @return
     */
    Long findCountByCondition(@Param("sysUser") SysUser sysUser);


    /**
     * 根据角色id集合查询用户信息
     * @return
     */
    List<SysUserVo> findUserByRoleIds(@Param("roleIds") List<Integer> roleIds);

    /**
     * 根据角色id集合查询用户信息
     * @return
     */
    List<SysUserVo> findUserByRoleIdsMap(Map roleIdMap);


    /**
     * 根据角色id集合查询用户信息
     * @return
     */
    List<SysUserVo> findUserByRoleIdsEntity(SysUserCondition sysUserCondition);

    Integer addUser(SysUser sysUser);


    Integer updateUser(SysUser sysUser);



    SysUserVo loginByUserNameAndPwd(@Param("userName") String userName,@Param("pwd") String pwd);

    SysUserVo findUserById(String userId);
}




